package com.warrior.superdata.mysql.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.warrior.superdata.constants.CommonConstant;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public abstract class Entity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @JsonFormat(pattern = CommonConstant.CONSTANT_DATETIME_FORMAT)
    private LocalDateTime createTime;

    @JsonFormat(pattern = CommonConstant.CONSTANT_DATETIME_FORMAT)
    private LocalDateTime updateTime;

}
